package cursojava2011;

import cursojava2011.domain.Amoeba;
import cursojava2011.domain.Shape;
import cursojava2011.domain.Square;
import cursojava2011.domain.Triangle;

public class RunPolimorfirmo {

	public static void main (String[] args){
				
		Shape[] shapes = new Shape[3];
		shapes[0] = new Triangle();
		shapes[1] = new Square();
		shapes[2] = new Amoeba();
		
		Shape figura = null;
		
		for (int i = 0; i < shapes.length; i++) {
			figura = shapes[i];
			System.out.println("[" + i + "]");
			figura.rotate();
			figura.playSound();
		}
	
	}
}
